package com.whty.demo.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.whty.demo.dao.StudentBaseRepository;
import com.whty.demo.pojo.Student;
import com.whty.demo.service.IStudentService;

@Service("studentServiceImpl")
public class StudentServiceImpl implements IStudentService{
	
	@Autowired
	private StudentBaseRepository repo;

	@Override
	public Student findOne(int id) {
		return repo.findOne(id);
	}

	@Override
	public List<Student> findAll() {
		return repo.findAll();
	}

	@Override
	public void delete(Student stu) {
		repo.delete(stu);
	}

	@Override
	public void saveEntity(Student stu) {
		repo.saveEntity(stu);
	}

	@Override
	public void updateEntity(Student stu, int id) {
		repo.updateEntity(stu);
	}
}
